//@author A0088498A
package common;

/**
 * The supported status of the Task <br/>
 * 
 */

public enum TaskStatus {
	undone, done, overdue, discard, block, free, invalid;
	
	/**
	 * Convert the String into the TaskStatus
	 * 
	 * @param string
	 *            to be converted
	 * @return the TaskStatus converted. Return invalid if the string is null
	 *         or cannot be converted
	 */
	public static TaskStatus getValueOf(String string) {
		try {
			return valueOf(string);
		} catch (RuntimeException e) {

			return invalid;
		}
	}
}
